package dynamicFields;

import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.Insets;

import javax.swing.JLabel;
import javax.swing.JTextField;

public class ReadEntry extends Entry{
	EntryList parent;
	JLabel title;
	JLabel contents;
	String oldContents;
	
	public ReadEntry(EntryList parent, String title) {
		this.parent = parent;
		this.title = new JLabel(title);
		this.title.setAlignmentX(LEFT_ALIGNMENT);
		GridBagConstraints gbcTitle = new GridBagConstraints();
		gbcTitle.anchor = GridBagConstraints.WEST;
		gbcTitle.insets = new Insets(0,0,0,5);
		gbcTitle.weightx = 1;
		gbcTitle.gridx = 0;
		gbcTitle.gridy = 0;
		this.add(this.title, gbcTitle);
		
		this.contents = new JLabel();
		this.contents.setAlignmentX(LEFT_ALIGNMENT);
		GridBagConstraints gbcCont = new GridBagConstraints();
		gbcCont.anchor = GridBagConstraints.WEST;
		gbcCont.insets = new Insets(0,0,0,5);
		gbcCont.weightx = 1;
		gbcCont.gridx = 1;
		gbcCont.gridy = 0;
		this.add(this.contents, gbcCont);
	}
	
	public void setText(String text) {
		this.contents.setText(text);
	}
	
	public boolean checkChanged() {
		return false;
	}
}
